<?php

namespace App\Kuafu\Pay\Enum;

use App\Kuafu\Base\Enum\BaseCodeEnum;

class PayCodeEnum extends BaseCodeEnum
{
    public const ERR_AUTH_CODE      = 411001;
    public const ERR_ALI_WX_BROWSER = 411002;
    public const ERR_ALI_BROWSER    = 411003;
    public const ERR_PAY_LISTS_PARAM = 411004;
    public const ERR_REQUEST_PARAM   = 411005;

    public const ERR_PAY_FACE_TO_FACE_PAY    = 511001;
    public const ERR_PAY_REFUND_TOTAL        = 511002;
    public const ERR_PAY_QUERY               = 511003;
    public const ERR_PAY_REFUND_QUERY        = 511004;
    public const ERR_PAY_REFUND_PART         = 511005;
    public const ERR_PAY_ERROR_PAY_CHANNEL   = 511006;
    public const ERR_PAY_DB_ADD              = 511007;
    public const ERR_PAY_DATA_NOT_EXIST      = 511008;
    public const ERR_PAY_DATA_NOT_PAY        = 511009;
    public const ERR_PAY_REFUND_NOT_ENOUGH   = 511010;
    public const ERR_PAY_NOT_TOTAL_REFUND    = 511011;
    public const ERR_REFUND_DB_ADD           = 511012;
    public const ERR_REFUND_ERR              = 511013;
    public const ERR_ORDER_HAS_PAY           = 511014;
    public const ERR_MINI_PREPAY_ERROR       = 511015;
    public const ERR_FY_MERCHANT_PRIVATE_KEY = 511016;
    public const ERR_FY_MERCHANT_PUBLIC_KEY  = 511017;
    public const ERR_FY_MICRO_PAY            = 511018;
    public const ERR_PAY_DB_EDIT             = 511019;
    public const ERR_PAY_FY_SHOP_ID_EMPTY    = 511020;
    public const ERR_PAY_CONFIG_EMPTY        = 511021;
    public const ERR_PAY_CONFIG_ERR          = 511022;
    public const ERR_QUERY_PAY_NOT_SUCCESS   = 511023;
    public const ERR_APP_PREPAY_ERROR        = 511024;
    public const ERR_APP_PAY_CHANNEL         = 511025;
    public const ERR_APP_PAY_SYS_TYPE        = 511026;
    public const ERR_PAY_UNION_ID            = 511027;
    public const ERR_PAY_ERROR_PAY_CHANNEL_CHILD  = 511028;
    public const ERR_PAY_SYS_TYPE                 = 511029;
    public const ERR_PAY_BIZ_CHANNEL         = 511030;
    public const ERR_PAY_COMPANY             = 511031;
    public const ERR_NATIVE_PAY_CHANNEL      = 511032;
    public const ERR_NATIVE_PREPAY_ERROR      = 511033;

    public const CODE_TEXT = [
        self::ERR_PAY_FACE_TO_FACE_PAY    => '面对面支付失败',
        self::ERR_PAY_REFUND_TOTAL        => '全额退款失败',
        self::ERR_PAY_QUERY               => '查询订单失败',
        self::ERR_PAY_REFUND_QUERY        => '查询退款订单失败',
        self::ERR_PAY_REFUND_PART         => '部分退款失败',
        self::ERR_PAY_ERROR_PAY_CHANNEL   => '错误的PAY_CHANNEL',
        self::ERR_PAY_DB_ADD              => '插入支付流水失败',
        self::ERR_PAY_DATA_NOT_EXIST      => '查不到该流水',
        self::ERR_PAY_DATA_NOT_PAY        => '该订单未支付',
        self::ERR_PAY_REFUND_NOT_ENOUGH   => '剩余可退款金额不足',
        self::ERR_PAY_NOT_TOTAL_REFUND    => '已做过退款，无法继续做全额退款',
        self::ERR_REFUND_DB_ADD           => '插入退款流水失败',
        self::ERR_REFUND_ERR              => '退款失败',
        self::ERR_ORDER_HAS_PAY           => '订单已支付，无法反复支付',
        self::ERR_AUTH_CODE               => '不支持的支付条形码编码',
        self::ERR_MINI_PREPAY_ERROR       => '小程序支付预生成订单失败',
        self::ERR_FY_MERCHANT_PRIVATE_KEY => '富友私钥解密失败',
        self::ERR_FY_MERCHANT_PUBLIC_KEY  => '富友公钥解密失败',
        self::ERR_FY_MICRO_PAY            => '富友被扫支付失败',
        self::ERR_PAY_DB_EDIT             => '更新支付流水失败',
        self::ERR_ALI_WX_BROWSER          => '请使用微信或支付宝扫码',
        self::ERR_ALI_BROWSER             => '暂不支持支付宝，请使用微信扫码',
        self::ERR_PAY_FY_SHOP_ID_EMPTY    => '当支付渠道为富友时，shopId不能为空',
        self::ERR_PAY_CONFIG_EMPTY        => '支付配置为空', // 富友
        self::ERR_PAY_CONFIG_ERR          => '支付配置错误', // 富友
        self::ERR_QUERY_PAY_NOT_SUCCESS   => '查询支付结果未成功',
        self::ERR_APP_PREPAY_ERROR        => 'APP支付预生成订单失败',
        self::ERR_APP_PAY_CHANNEL         => 'APP支付仅支持支付宝、微信、网商银行.',
        self::ERR_APP_PAY_SYS_TYPE        => '不支持的系统平台',
        self::ERR_PAY_UNION_ID            => '不存在的unionId',
        self::ERR_PAY_ERROR_PAY_CHANNEL_CHILD  => '错误的PAY_CHANNEL_CHILD',
        self::ERR_PAY_SYS_TYPE            => '当前支付渠道不支持的sysType',
        self::ERR_PAY_BIZ_CHANNEL            => '当前业务场景下，不支持该支付类型',
        self::ERR_PAY_COMPANY             => '获取支付公司账户失败',
        self::ERR_PAY_LISTS_PARAM         => '查询支付列表的入参错误',
        self::ERR_REQUEST_PARAM         => '请求参数错误',
        self::ERR_NATIVE_PAY_CHANNEL         => 'native支付渠道仅支持微信',
        self::ERR_NATIVE_PREPAY_ERROR         => 'native支付预生成订单失败',
    ];
}
